package com.salt.admin.api.feign.client;

import com.salt.admin.api.feign.hystrix.SystemFileClientHystrix;
import com.salt.admin.api.model.SystemFile;
import com.salt.common.constant.Common;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Description
 * @Author salt
 * @Date 2022/4/14
 * @Version 1.0.1
 */
@FeignClient(name = Common.Service.SALT_ADMIN_SERVICE_NAME,
        path = Common.Service.SALT_ADMIN_FILE_URL_PREFIX,
        fallbackFactory = SystemFileClientHystrix.class)
public interface SystemFileClient {

    String API_PREFIX = "/client";
    String LIST = API_PREFIX + "/list";

    @PostMapping(LIST)
    public List<SystemFile> findList(@RequestBody SystemFile systemFile);

    @PostMapping("find")
    public SystemFile find(@RequestBody SystemFile systemFile);
}
